<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/8/14
 * Time: 21:34
 */

namespace Home\Controller;
use Think\Controller;

class TicketManagerController extends Controller{
    public function showTickets(){
        $userInfo=session('UserInfo');
        $luckyMoney=D('LuckyMoney');
        $luckyMoneyInfo=$luckyMoney->queryluckyMoney($userInfo['id']);
        $sumMoney=$luckyMoney->sumAll($userInfo['id']);
        //var_dump($luckyMoneyInfo);
        $lottery=D('Lottery');
        $lotteryInfo=$lottery->queryLottery($userInfo['id']);
        //var_dump($lotteryInfo);
        $number=$lottery->lotteryNumber(2);
        //var_dump($number);
        $this->assign('sumMoney',$sumMoney);
        $this->assign('luckyMoneyInfo',$luckyMoneyInfo);
        $this->assign('number',$number);
        $this->assign('lotteryInfo',$lotteryInfo);
        $this->display("User/tickets");
    }
}